Skip to content

gh-78214: marshal: Stabilize FLAG_REF usage#8226

Merged
methane merged 5 commits intopython:mainfrom
methane:stable-marshal
May 4, 2022
Merged

gh-78214: marshal: Stabilize FLAG_REF usage#8226
methane merged 5 commits intopython:mainfrom
methane:stable-marshal

Conversation

@methane
Copy link
Member

@methane methane commented Jul 10, 2018

marshal.dumps() tests refcnt(obj)==1 to decide use FLAG_REF or not.

But refcnt of interned string is very unstable.
When compiling same source, refcnt of interned string in the output
may be 1 or >1. It makes FLAG_REF usage unstable.

To help reproducible build, use FLAG_REF for interned string even if
refcnt(obj)==1.

https://bugs.python.org/issue34033

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-feature A feature request or enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants